package exp4;

import java.math.BigInteger;

//使用栈将一个很长（30~100位）的十进制数转换为二进制数
public class Decimal2Binary {
    public static void main(String[] args) {
        BigInteger b=new BigInteger("123456789012345678901234567890");
        System.out.println(b);
//        System.out.println(b.add(b));
//        System.out.println(b.subtract(b));
//        System.out.println(b.multiply(b));
//        System.out.println(b.pow(5));
//        System.out.println(b.gcd(b));
//        System.out.println(b.divide(new BigInteger("2")));
        System.out.println(b.toString(2));

    }
}
